package m202401.d09;

/**
 * @@author: 爱做梦的锤子
 * @date: 2024/1/9 17:34
 */
//9. 回文数
public class Q9 {
    public boolean isPalindrome(int x) {
        String xs = String.valueOf(x);
        for (int i = 0, j = xs.length() - 1; i <= j; i++, j--) {
            if (xs.charAt(i) != xs.charAt(j)) {
                return false;
            }
        }
        return true;
    }
}
